
gl path "~/Dropbox/voter_id/Replication"

cap log close
log using "$path/figure_a3.log", replace

use election voted no_dmv_match birth_year race_string new_reg ///
	using "$path/nc_dataset.dta" if new_reg == 0, clear

// drop 2018
drop if inlist(election, 11, 12)

// generate race by age FEs
egen race_age = group(birth_year race_string)
drop birth_year race_string

gen year = election + 2006
drop election
compress
binscatter voted year, by(no_dmv_match) absorb(race_age) linetype(connect)  ///
	xtitle("") ytitle("Election Turnout Rate") n(10) legend(off)

graph export "$path/figure_a3.pdf", replace

log close

